package util;

public class PathTool {
	static String webPath;
	static String classesPath;
	
	static {
		classesPath = Thread.currentThread().getContextClassLoader().getResource("").getPath();
		webPath = classesPath.substring(1, classesPath.lastIndexOf("WEB-INF"));
	}
	
	public static String getWebPath() {
		System.out.println(webPath);
		return webPath;
	}
	
	public static String getFileName(String fileName) {
		return fileName.substring(fileName.lastIndexOf("/") + 1, fileName.length());
	}
	
	public static void main(String[] args) {
	}
}
